<main class="app-content">
    <div class="app-title">
        <div>
            <h1><i class="fa fa-gear"></i>配置管理-Worker</h1>
        </div>
        <ul class="app-breadcrumb breadcrumb">
            <li class="breadcrumb-item"><i class="fa fa-home fa-lg"></i></li>
            <li class="breadcrumb-item"><a href="/">首页</a></li>
            <li class="breadcrumb-item active"><a href="#">配置管理-Worker</a></li>
        </ul>
    </div>

    <div class="row">
        <div class="col-md-6">
            {{ if eq .UserRole "superadmin" "admin" }}
            <div class="tile">
                <h3 class="tile-title">端口扫描默认配置</h3>
                <div class="tile-body">
                    <form>
                        <div class="form-group">
                            <label class="col-form-label" for="select_cmdbin">
                                <b>默认扫描程序</b>
                            </label>
                            <select class="form-control" id="select_cmdbin">
                                <option value="masscan">masscan</option>
                                <option value="nmap">nmap</option>
                                <option value="gogo">gogo（支持socks5代理）</option>
                            </select>
                            <label class="col-form-label" for="input_port">
                                <b>默认扫描端口:</b>（支持Nmap格式的端口列表）
                            </label>
                            <input class="form-control" id="input_port" type="text"
                                   placeholder="--top-ports 1000（支持Nmap格式的端口列表）" value="">
                            <label for="select_tech"><b>探测技术</b></label>
                            <select class="form-control" id="select_tech">
                                <option value="-sS">-sS</option>
                                <option value="-sT">-sT</option>
                                <option value="-sV">-sV</option>
                            </select>
                            <label for="input_rate"><b>扫描速度</b></label>
                            <input class="form-control" id="input_rate" type="text" placeholder="1000（默认）"
                                   value="">
                        </div>
                        <div class="form-check form-check-inline">
                            <label class="form-check-label" for="checkbox_ping">
                                <input class="form-check-input" id="checkbox_ping" type="checkbox">PING
                            </label>
                        </div>
                    </form>
                </div>
                <div class="tile-footer">
                    <button class="btn btn-primary" type="button" id="buttonSaveNmap"><i
                            class="fa fa-fw fa-lg fa-check-circle"></i>保存设置
                    </button>&nbsp;&nbsp;&nbsp;
                </div>
            </div>
            <div class="tile">
                <h3 class="tile-title">子域名收集默认配置</h3>
                <div class="tile-body">
                    <form>
                        <div class="form-group">
                            <label class="col-form-label" for="div_subdomain">
                                <b>子域名收集技术：</b>
                            </label>
                            </br>
                            <div class="form-check form-check-inline" id="div_subdomain">
                                <div class="form-check form-check-inline">
                                    <label class="form-check-label" for="checkbox_subfinder">
                                        <input class="form-check-input" id="checkbox_subfinder" type="checkbox">子域名被动枚举
                                    </label>
                                </div>
                                <div class="form-check form-check-inline">
                                    <label class="form-check-label" for="checkbox_subdomainbrute">
                                        <input class="form-check-input" id="checkbox_subdomainbrute" type="checkbox">子域名暴力枚举
                                    </label>
                                </div>
                                <div class="form-check form-check-inline">
                                    <label class="form-check-label" for="checkbox_subdomaincrawler">
                                        <input class="form-check-input" id="checkbox_subdomaincrawler" type="checkbox">子域名爬虫
                                    </label>
                                </div>
                            </div>
                            </br>
                            <div class="form-check form-check-inline">
                                <div class="form-check form-check-inline">
                                    <label class="form-check-label" for="checkbox_icp">
                                        <input class="form-check-input" id="checkbox_icp" type="checkbox">ICP备案查询
                                    </label>
                                </div>
                                <div class="form-check form-check-inline">
                                    <label class="form-check-label" for="checkbox_whois">
                                        <input class="form-check-input" id="checkbox_whois" type="checkbox">Whois查询
                                    </label>
                                </div>
                                <div class="form-check form-check-inline">
                                    <label class="form-check-label" for="checkbox_ignorecdn">
                                        <input class="form-check-input" id="checkbox_ignorecdn" type="checkbox">忽略CDN
                                    </label>
                                </div>
                                <div class="form-check form-check-inline">
                                    <label class="form-check-label" for="checkbox_ignoreoutofchina">
                                        <input class="form-check-input" id="checkbox_ignoreoutofchina" type="checkbox">忽略非中国大陆IP
                                    </label>
                                </div>
                                <div class="form-check form-check-inline">
                                    <label class="form-check-label" for="checkbox_portscan">
                                        <input class="form-check-input" id="checkbox_portscan" type="checkbox">对IP进行端口扫描
                                    </label>
                                </div>
                            </div>
                            <br/>
                            <label class="col-form-label" for="select_wordlist">
                                <b>暴力枚举字典文件：</b>
                            </label>
                            <select class="form-control" id="select_wordlist">
                                <option value="subnames.txt">subnames.txt（9万条记录）</option>
                                <option value="subnames_medium.txt">subnames_medium.txt（88万条记录）</option>
                            </select>
                        </div>
                    </form>
                </div>
                <div class="tile-footer">
                    <button class="btn btn-primary" type="button" id="buttonSaveDomainscan"><i
                            class="fa fa-fw fa-lg fa-check-circle"></i>保存设置
                    </button>&nbsp;&nbsp;&nbsp;
                </div>
            </div>
            <div class="tile">
                <h3 class="tile-title">指纹获取默认配置</h3>
                <div class="tile-body">
                    <form>
                        <div class="form-check form-check-inline">
                            <label class="form-check-label" for="checkbox_httpx">
                                <input class="form-check-input" id="checkbox_httpx" type="checkbox">Httpx
                            </label>
                        </div>
                        <div class="form-check form-check-inline">
                            <label class="form-check-label" for="checkbox_fingerprinthub">
                                <input class="form-check-input" id="checkbox_fingerprinthub" type="checkbox">FingerprintHub
                            </label>
                        </div>
                        <div class="form-check form-check-inline">
                            <label class="form-check-label" for="checkbox_screenshot">
                                <input class="form-check-input" id="checkbox_screenshot" type="checkbox">Screenshot
                            </label>
                        </div>
                        <div class="form-check form-check-inline">
                            <label class="form-check-label" for="checkbox_iconhash">
                                <input class="form-check-input" id="checkbox_iconhash" type="checkbox">IconHash
                            </label>
                        </div>
                        <div class="form-check form-check-inline">
                            <label class="form-check-label" for="checkbox_fingerprintx">
                                <input class="form-check-input" id="checkbox_fingerprintx" type="checkbox">Fingerprintx
                            </label>
                        </div>
                    </form>
                </div>
                <div class="tile-footer">
                    <button class="btn btn-primary" type="button" id="buttonSaveFingerprint"><i
                            class="fa fa-fw fa-lg fa-check-circle"></i>保存设置
                    </button>&nbsp;&nbsp;&nbsp;
                </div>
            </div>
            {{ end }}
        </div>
        <div class="col-md-6">
            {{ if eq .UserRole "superadmin" "admin" }}
            <div class="tile">
                <h3 class="tile-title">在线API默认设置</h3>
                <div class="tile-body">
                    <form>
                        <div class="form-group">
                            <label class="col-form-label">
                                <b>在线API接口：</b>
                            </label>
                            </br>
                            <div class="form-check form-check-inline">
                                <div class="form-check form-check-inline">
                                    <label class="form-check-label" for="checkbox_fofa">
                                        <input class="form-check-input" id="checkbox_fofa" type="checkbox">FOFA
                                    </label>
                                </div>
                                <div class="form-check form-check-inline">
                                    <label class="form-check-label" for="checkbox_hunter">
                                        <input class="form-check-input" id="checkbox_hunter" type="checkbox">Hunter
                                    </label>
                                </div>
                                <div class="form-check form-check-inline">
                                    <label class="form-check-label" for="checkbox_quake">
                                        <input class="form-check-input" id="checkbox_quake" type="checkbox">Quake
                                    </label>
                                </div>
                            </div>
                            </br>
                            <label class="col-form-label" for="input_pagesize">
                                <b>API请求的每页数量：</b>
                            </label>
                            <input class="form-control" id="input_pagesize" type="text" value="">
                            <label class="col-form-label" for="input_limitcount">
                                <b>搜索结果数量限制（0表示不限制）：</b>
                            </label>
                            <input class="form-control" id="input_limitcount" type="text" value="">
                            <label class="col-form-label" for="input_fofa_token">
                                <b>FOFA Token</b>
                            </label>
                            <input class="form-control" id="input_fofa_token" type="text"
                                   placeholder="fofa token，格式为email:token，多个token以,分隔"
                                   value="">
                            <label class="col-form-label" for="input_hunter_token">
                                <b>Hunter Token</b>
                            </label>
                            <input class="form-control" id="input_hunter_token" type="text"
                                   placeholder="hunter token，多个token以,分隔"
                                   value="">
                            <label class="col-form-label" for="input_quake_token">
                                <b>Quake Token</b>
                            </label>
                            <input class="form-control" id="input_quake_token" type="text"
                                   placeholder="quake token，多个token以,分隔"
                                   value="">
                            <label class="col-form-label" for="input_chinaz_token">
                                <b>Chinaz ICP Token</b>
                            </label>
                            <input class="form-control" id="input_chinaz_token" type="text"
                                   placeholder="chinaz icp token，多个token以,分隔"
                                   value="">
                        </div>
                    </form>
                </div>
                <div class="tile-footer">
                    <button class="btn btn-primary" type="button" id="buttonSaveAPIToken"><i
                            class="fa fa-fw fa-lg fa-check-circle"></i>保存设置
                    </button>&nbsp;&nbsp;&nbsp;
                    <button class="btn btn-primary" type="button" id="buttonTestAPIToken"><i
                            class="fa fa-fw fa-lg fa-podcast"></i>测试API
                    </button>
                    （点击测试后需要一定时间，请等待...）&nbsp;&nbsp;&nbsp;
                </div>
            </div>
            <div class="tile">
                <h3 class="tile-title">Worker代理设置</h3>
                <div class="tile-body">
                    <form>
                        <small class="form-text text-muted">Worker支持代理的技术与工具有：gogo、域名被动收集、域名爬虫、指纹识别、在线资产API接口、Nuclei；多个代理分行设置、随机选取；目前只支持socks5代理。</small>
                        <small class="form-text text-muted">由于chrome不支持带验证的socks5代理，因此在127.0.0.1:5010进行代理转发到设置的代理服务器中。</small>
                        <small class="form-text text-muted">Worker的启动参数-np可关闭代理的使用和本地转发。</small>
                        <br/>
                        <div class="form-group">
                            <textarea class="form-control" id="text_proxy_list" rows="4"></textarea>
                        </div>
                    </form>
                </div>
                <div class="tile-footer">
                    <button class="btn btn-primary" type="button" id="buttonSaveWorkerProxy"><i
                            class="fa fa-fw fa-lg fa-check-circle"></i>保存设置
                    </button>&nbsp;&nbsp;&nbsp;
                </div>
            </div>
            {{ end }}
        </div>
        <div class="clearix"></div>
    </div>
</main>
<script src="static/js/jquery/jquery-3.3.1.min.js"></script>
<script src="static/js/bootstrap/popper.min.js"></script>
<script src="static/js/bootstrap/bootstrap.min.js"></script>
<script src="static/js/main.js"></script>
<script src="static/js/plugins/pace.min.js"></script>
<script src="static/js/plugins/jquery.dataTables.min.js"></script>
<script src="static/js/plugins/dataTables.bootstrap.min.js"></script>
<script src="static/js/sweetalert/sweetalert.min.js"></script>
<script src="static/js/jquery/jquery.bootstrap-duallistbox.js"></script>
<script src="static/js/server/config-worker.js"></script>
<script>
    $(function () {
        $("title").html("Config-Nemo");
    });
</script>